<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			window.onload = function() {
				var btn = document.getElementsByTagName("input")[2];
				btn.onclick = function() {
					console.log("onclick");
				}
				btn.onmouseenter = function() {
					console.log("onmouseenter");
				}
				btn.onmouseleave = function() {
					console.log("onmouseleave");
				}
			}
			
			// 函数不要使用click这个名字
			function cli() {
				console.log("click");
			}
			
			function enter() {
				console.log("enter");
			}
			
			function leave() {
				console.log("leave");
			}
		</script>
	</head>
	<body>
		<input type="button" onclick="alert('hello js')" value="click"/><br/>
		<input type="button" onclick="cli()" onmouseenter="enter()" onmouseleave="leave()" value="click" />
		<br />
		<input type="button" value="click" />
	</body>
</html>
